#include <errno.h>
#include <pty.h>
-#include "xenctrl.h"
#include "xs.h"
#define ESCAPE_CHARACTER 0x1d
tcsetattr(fd, TCSAFLUSH, old);
}
-static int console_loop(int xc_handle, domid_t domid, int fd)
+static int console_loop(int fd)
{
int ret;
{
struct termios attr;
int domid;
- int xc_handle;
char *sopt = "h";
int ch;
int opt_ind=0;
err(errno, "Could not contact XenStore");
}
- xc_handle = xc_interface_open();
- if (xc_handle == -1) {
- err(errno, "xc_interface_open()");
- }
-
signal(SIGTERM, sighandler);
path = xs_get_domain_path(xs, domid);
free(path);
init_term(STDIN_FILENO, &attr);
- console_loop(xc_handle, domid, spty);
+ console_loop(spty);
restore_term(STDIN_FILENO, &attr);
return 0;